<div class=" pagination">
        <ul class="pagination">
            <?
            echo $pagination->create_links();
            ?>
        </ul>    
    </div>
<table class="table table-striped table-bordered table-condensed"> <!-- cellspacing='0' is important, must stay -->

	<!-- Table Header -->
	<thead>
		<tr>
			<th style="width:15%">OrderID</th>
			<th style="width:15%">Order Date</th>
			<th style="width:10%">มูลค่า</th>
			<th style="width:10%">ส่วนลด</th>
			<th style="width:10%">คงเหลือ</th>
            <th style="width:10%">สถานะใบสั่งซื้อ</th>
			<th style="width:10%">ดูข้อมูล</th>
		</tr>
	</thead>
	<!-- Table Header -->
	
	<!-- Table Body -->
	<tbody>
<?
	if(!empty($dataList)){
	?>
		<?
		
		foreach($dataList as $in=>$val){
			
		?>
			<tr>
				<td><?php echo $val->OrderID?></td>
				<td><?php echo $val->CreateOn?></td>
				<td align="right"><?php echo number_format($val->TotalAmount,2)?></td>
				<td align="right"><?php echo number_format($val->Discount,2)?></td>
				<td align="right"><?php echo number_format($val->PriceAfterDisc,2)?></td>
                <td align="center"><?php echo getSaleStatus($val->SALES_ORDER_FLAG)?></td>
				
				<td align="right"><a target="_blank" href="<?php echo base_url()?>Order/viewOrder/?orderid=<?php echo $val->OrderID?>">ข้อมูล Order</a></td>
			</tr>
		<?
		}
		?>
<?
	}else{
	?>
		<tr>
			<td colspan="7"><h2>ไม่พบข้อมูล</h2></td>
		</tr>
	<?
	}
	?>
	
	</tbody>
	
	<!-- Table Body -->

</table>
<div class=" pagination">
        <ul class="pagination">
            <?
            echo $pagination->create_links();
            ?>
        </ul>    
    </div>
    